import { useRef } from "react";
import SearchButton from "./SearchButton";
import SearchInput, { Ref } from "./SearchInput";

function Page() {
  const inputRef = useRef<Ref>(null);
  return (
    <>
      <nav>
        <SearchButton
          onClick={() => {
            inputRef.current?.focus();
          }}
        />
      </nav>
      <SearchInput ref={inputRef} />
    </>
  );
}

export default Page;
